<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>区域维护</title>
    <jsp:include page="/IncludeJS.jsp"></jsp:include>
</head>
<body onload="init();">
<script type="text/javascript">
    function check() {
        if ($("#areaName").val() == "") {
            alert("请输入区域名称");
            $('#areaName').focus();
            return false;
        }
        if ($("#id").val() == "") {
            $("#id").val(0);
        }
        return true;
    }

    function init() {
        var key = $("#id").val();

    }

    function back() {
        location.href = "${pageContext.request.contextPath }/area/list";
    }

    if ("${msg}" != null && "${msg}".length > 0) {
        alert("${msg}");
    }
</script>
<table class="tablelist2">
    <tbody>
    <tr>
        <td class="tableselect2" style="border-bottom:none;">
            <div class="tools">
                <ul class="toolbar">
                    <li class="click"><a href="javascript:void(0);" onclick="back();"><i></i>返回</a></li>
                </ul>
            </div>
        </td>
    </tr>
    </tbody>
</table>
<form action="${pageContext.request.contextPath }/area/save" id="managerform" method="post" onsubmit="return check();">
    <input type="hidden" name="areaId" id="id" value="${area.areaId}"></input>
    <table cellpadding="0" cellspacing="0" width="1000" style="margin: 0 auto">
        <tr height="30">
            <td align="right" width="90">区域名称</td>
            <td><input type="text" name="areaName" id="areaName" value="${area.areaName}" style="width:200px"/></td>
        </tr>
        <tr style="background-image: url('images/maintitle.jpg')">
            <td></td>
            <td><input type="submit" value="  保 存  " name="isEmpty"></td>
        </tr>
    </table>
</form>
</body>
</html>